package edu.cmu.ece.ds.droidchat.message;

import java.io.Serializable;

/**
 * An object that represent the registration request from the DroidChat user to
 * the DroidChat server
 *
 * a subclass of "DroidChatMessage"
 */
public class ClientRegisterMessage extends DroidChatMessage implements
        Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 5321905199763701778L;
    
    //private UserInfo userInfo; <-- cannot have UserInfo as a field 
    //android.graphics.drawable.BitmapDrawable not Serializable

    private String username;
    private String password;
    private byte[] pic;
    private int bg;
    private String nickname;

	public ClientRegisterMessage(
    		String username,
    		String password,
    		byte[] pic,
    		int background,
    		String nickname) {
        super(DroidChatMessage.CLIENT_REGISTER);
        this.username = username;
        this.password = password;
        this.pic = pic;
        this.bg = background;
        this.nickname = nickname;
    }

    public String getUsername() {
        return username;
    }
    public String getPassword() {
        return password;
    }

    public byte[] getPic(){
    	return pic;
    }
    
    public int getBG() {
		return bg;
	}
	public void setBG(int bg) {
		this.bg = bg;
	}
    
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	
    public String toString() {
        return "ClientRegisterMessage: userInfo=" 
        	+ this.username
            + " password=" + this.password;
    }
}
